home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 7 / BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso / Files / Hyper / Me-Mz / MH Power Scripts v1.3.cpt / MH Power Scripts v1.3 / background_2663.txt < prev    next >
Text File  |  1988-05-06  |  8KB  |  305 lines

  1. -- background: 2663 from stack: in.3
  2. -- bmap block id: 9059
  3. -- flags: 4000
  4. -- background id: 0
  5. -- name: 
  6. ----- HyperTalk script -----
  7. on openCard
  8.   -- PUT CARD INFORMATION INTO THE FIELD "CARD DESCRIPTION"
  9.   put "Card" && the number of this card && "of" && the number of cards into background field "Card Description"
  10.   NumberOfCards
  11.  
  12.   -- SET THE NAMES OF PREVIOUS AND NEXT BUTTONS (ID 1 AND 6) TO:
  13.   put "Card" && the number of this card into NewPrevName
  14.   put "of" && the number of cards into NewNextName
  15.   set the name of background button ID 1 to NewPrevName
  16.   set the name of background button ID 7 to NewNextName
  17.  
  18.  
  19.   Set userLevel to 2
  20. end openCard
  21.  
  22.  
  23. -- part 1 (button)
  24. -- low flags: 00
  25. -- high flags: A000
  26. -- rect: left=397 top=293 right=339 bottom=452
  27. -- title width / last selected line: 0
  28. -- icon id / first selected line: 1016 / 1016
  29. -- text alignment: 1
  30. -- font id: 0
  31. -- text size: 12
  32. -- style flags: 0
  33. -- line height: 16
  34. -- part name: Card 1
  35. ----- HyperTalk script -----
  36. on mouseDown
  37.   visual effect scroll right
  38.   --go to previous card
  39.   go to previous card of this background
  40. end mouseDown
  41.  
  42. on mouseStillDown
  43.   mouseDown
  44. end mouseStillDown
  45.  
  46.  
  47. -- part 7 (button)
  48. -- low flags: 00
  49. -- high flags: A000
  50. -- rect: left=451 top=293 right=339 bottom=506
  51. -- title width / last selected line: 0
  52. -- icon id / first selected line: 32650 / 32650
  53. -- text alignment: 1
  54. -- font id: 0
  55. -- text size: 12
  56. -- style flags: 0
  57. -- line height: 16
  58. -- part name: of 20
  59. ----- HyperTalk script -----
  60. on mouseDown
  61.   visual effect scroll left
  62.   --go to next card
  63.   go to next card of this background
  64. end mouseDown
  65.  
  66. on mouseStillDown
  67.   mouseDown
  68. end mouseStillDown
  69.  
  70.  
  71. -- part 8 (field)
  72. -- low flags: 00
  73. -- high flags: 0000
  74. -- rect: left=4 top=323 right=339 bottom=171
  75. -- title width / last selected line: 0
  76. -- icon id / first selected line: 0 / 0
  77. -- text alignment: 1
  78. -- font id: 3
  79. -- text size: 12
  80. -- style flags: 256
  81. -- line height: 16
  82. -- part name: Card Description
  83. ----- HyperTalk script -----
  84. -- See the openCard command located under the script for this background
  85.  
  86.  
  87. -- part 9 (field)
  88. -- low flags: 00
  89. -- high flags: 6004
  90. -- rect: left=7 top=21 right=320 bottom=262
  91. -- title width / last selected line: 0
  92. -- icon id / first selected line: 0 / 0
  93. -- text alignment: 0
  94. -- font id: 3
  95. -- text size: 10
  96. -- style flags: 0
  97. -- line height: 12
  98. -- part name: Item Description
  99.  
  100.  
  101. -- part 10 (button)
  102. -- low flags: 00
  103. -- high flags: 2000
  104. -- rect: left=272 top=293 right=330 bottom=314
  105. -- title width / last selected line: 0
  106. -- icon id / first selected line: 14767 / 14767
  107. -- text alignment: 1
  108. -- font id: 0
  109. -- text size: 12
  110. -- style flags: 0
  111. -- line height: 16
  112. -- part name: Home
  113. ----- HyperTalk script -----
  114. on mouseUp
  115.   Visual effect iris close to black
  116.   Visual effect wipe down to gray
  117.   Visual effect iris open
  118.   go to card "StartCard"
  119. end mouseUp
  120.  
  121.  
  122.  
  123. -- part 11 (button)
  124. -- low flags: 00
  125. -- high flags: 2000
  126. -- rect: left=351 top=293 right=330 bottom=397
  127. -- title width / last selected line: 0
  128. -- icon id / first selected line: 1011 / 1011
  129. -- text alignment: 1
  130. -- font id: 0
  131. -- text size: 12
  132. -- style flags: 0
  133. -- line height: 16
  134. -- part name: Home
  135. ----- HyperTalk script -----
  136. on mouseUp
  137.   if the commandkey is down then
  138.     doMenu "Quite HyperCard"
  139.   else
  140.     go home
  141.   end if
  142. end mouseUp
  143.  
  144.  
  145.  
  146. -- part 12 (button)
  147. -- low flags: 00
  148. -- high flags: 0000
  149. -- rect: left=313 top=293 right=330 bottom=352
  150. -- title width / last selected line: 0
  151. -- icon id / first selected line: 8538 / 8538
  152. -- text alignment: 1
  153. -- font id: 0
  154. -- text size: 12
  155. -- style flags: 0
  156. -- line height: 16
  157. -- part name: SuperFind: Version 1.1
  158. ----- HyperTalk script -----
  159. on copyright
  160.  
  161.   -- Super Find, Copyright by Mac Help Co., January 1988
  162.   -- by Chris Hostetter, Mac Help Co., 1800 East Market Street
  163.   -- Long Beach, CA  90805, (213) 428-7414
  164.   --      The script for this button is copyrighted and may not be
  165.   --      used without the written permission of the author (above).
  166.   --  SHAREWARE COST IS $ 3.00 (for personal stacks).
  167.   --  WRITE AUTHOR FOR STACKS TO BE DISTRIBUTED WITH THIS SCRIPT.
  168.  
  169. end copyright
  170.  
  171.  
  172. on mouseUp
  173.   Global  LastField, OncePerCard
  174.   Global SuperFindName, SearchCommands, Searchstring, SearchStart
  175.   Global SearchTimesFound, FindType, OriginalID
  176.  
  177.   get the selection
  178.   if it is not empty then put it into SearchString
  179.  
  180.   put the name of the target into SuperFindName
  181.   set hilite of SuperFindName to true
  182.  
  183.   put "Chars" into FindType
  184.   put empty into SearchLimit
  185.   ask "Find Word(s)?   Hold option key for limits." with SearchString
  186.   set hilite of SuperFindName to false
  187.   if it is empty then
  188.     put 0 into searchtimesfound
  189.     exit mouseUp
  190.   end if
  191.   put it into SearchString
  192.  
  193.   if SearchString is "Date" then
  194.     --answer "Find the word 'Date' or Enter a Date?" with "Find Word" or "Enter"
  195.     put "Enter" into it
  196.  
  197.     if it is "Enter" then
  198.       put the short date into it
  199.       ask "Enter date you wish to find?   I.e. (0/0/00)" & Return & Return & "Today's Date is: " && the long date with it
  200.       if it is empty then exit mouseUp
  201.       put it into SearchString
  202.       answer "Search for  '" & SearchString & "'  in what format?" with "Seconds" or "Long Date" or "Short Date"
  203.       put it into DateType
  204.       if SearchString contains "T" then
  205.         put the short date into SearchString
  206.       end if
  207.       if DateType is "Seconds" then convert SearchString to Seconds
  208.       if DateType is "Long Date" then convert SearchString to Long Date
  209.       if DateType is "Short Date" then convert SearchString to Short Date
  210.     end if
  211.   end if
  212.  
  213.   put false into OncePerCard
  214.   if the OptionKey is down then
  215.     if LastField is not empty then
  216.       put LastField into ShortLastField
  217.       delete word 1 of ShortLastField
  218.       delete word 1 of ShortLastField
  219.       Answer "Search for information in what field?" with "Cancel" or ShortLastField or "Any Field"
  220.       if it is "Cancel" Then
  221.         exit mouseUp
  222.       end if
  223.       if it is ShortLastField then
  224.         put " in " & LastField into SearchLimit
  225.       else
  226.         put "" into SearchLimit
  227.       end if
  228.     end if
  229.     Answer "Find " & FindType & " '" & Searchstring & "'" with "Begins With" or "Full Word" or "These Chars"
  230.     if it is "Begins with" then put empty into FindType
  231.     if it is "Full Word" then put "Word" into FindType
  232.     if it is "These Chars" then put "Chars" into FindType
  233.     answer "Find string only one time per card?" with "1 per card" or "ALL"
  234.     if it is "1 per card" then put true into OncePerCard
  235.   end if    -- the optionKey segment
  236.  
  237.  
  238.   put "Find" && FindType && Quote & SearchString & Quote & SearchLimit into SearchCommands
  239.  
  240.   set loc of message box to 20,-50
  241.   put "Send DoSearch to" && SuperFindName into the message box
  242.   hide message box
  243.   set loc of message box to 20,300
  244.  
  245.   put the ID of this Card into OriginalID
  246.   put 0 into SearchTimesFound
  247.  
  248.   do message box
  249.  
  250. end mouseUp
  251.  
  252.  
  253.  
  254. on "DoSearch"
  255.   Global SuperFindName, SearchCommands, Searchstring, SearchStart
  256.   Global SearchTimesFound, FindType, LastCardID, ManyCards, OriginalID
  257.   Global OncePerCard
  258.  
  259.   if SearchTimesFound is 0 then
  260.     -- initialize variables
  261.     put False into ManyCards
  262.     put the ID of this card into LastCardID
  263.   end if
  264.  
  265.   if OncePerCard is true then go to next card
  266.   do SearchCommands
  267.  
  268.   if the result is "Not Found" then
  269.     beep
  270.     put 0 into SearchTimesFound
  271.     answer "Can't Find:" && FindType && "'" & SearchString & "'" with "Cancel" or "Re-Search"
  272.     if it is "Re-Search" then click at the loc of SuperFindName
  273.     exit "DoSearch"
  274.   end if
  275.  
  276.   if SearchTimesFound is 0 then
  277.     put the ID of this card into SearchStart
  278.     put the ID of this card into LastCardID
  279.   end if
  280.  
  281.   if the ID of this card is not LastCardID then
  282.     put True into ManyCards
  283.     put the ID of this card into LastCardID
  284.   end if
  285.  
  286.   if ManyCards is True and SearchTimesFound > 0 then
  287.     if the ID of this card is SearchStart then
  288.       beep
  289.       wait 60
  290.       if the ID of this card is not OriginalID then
  291.         answer SearchTimesFound && "Occourance(s) of" && FindType && "'" & SearchString & "'" with "Return" or "Cancel" or "Re-Search"
  292.       else
  293.         answer SearchTimesFound && "Occourance(s) of" && FindType && "'" & SearchString & "'" with "Cancel" or "Re-Search"
  294.       end if
  295.       if it is "Re-Search" then click at the loc of SuperFindName
  296.       if it is "Return" then go to OriginalID
  297.       put 0 into SearchTimesFound
  298.       exit "DoSearch"
  299.     end if
  300.   end if
  301.  
  302.   add 1 to SearchTimesFound
  303.  
  304. end "DoSearch"
  305.